package com.zhu.rpc;

import com.google.gson.Gson;

public class JsonUtil {
    private static Gson gson = new Gson();
    public static String toJson(Object o){
        return gson.toJson(o);
    }

    public static <T> T getObj(String jsonStr,Class<T> cla){
        return gson.fromJson(jsonStr,cla);
    }

}
